Electronic systems and devices facilitate increased productivity and reduced costs in analyzing and communicating various types of data. These electronic systems (e.g., digital computers, calculators, audio devices, video equipment, telephone systems, etc.) typically include various components that need access to memory to implement their desired functionality or operations. Conventional attempts at utilizing virtual addresses and pointers across various components of a system are typically complicated and can have undesirable impacts.
Many computing systems often have multiple processors (e.g., a central processing unit (CPU), a graphics processing unit (GPU), etc.) and respective memories with their own respective memory management units (MMUs). This potentially leads to a scenario where there are two distinct address spaces, one that is setup by the OS for the CPU and the other that is setup by the GPU driver for the GPU. These are often distinct virtual address (VA) spaces setup by different software components and can potentially lead to pointer collision or overlap. The various conventional approaches that attempt to handle virtual addresses and pointer tracking typically have a number of problems. Some traditional attempts at resolving these issues are directed at having applications try to explicitly track which VA space a pointer belongs to. Some traditional approaches attempt to reserve a large CPU VA chunk from the OS and have the GPU driver allocate only in this VA range. However, this approach often has a number of drawbacks including possible waste of CPU VA space if a large chunk is reserved initially but the actual amount of space that is required or utilized is much less. In some systems (e.g., on 32 bit CPU, etc.) the VA space can be considered relatively small and reserving large chunks of CPU VA space for the GPU can result in lower system utilization and inadequate VA space remaining available for operations of the other components (e.g., CPU, etc.).
Some programs (e.g., a CUDA program, etc.) often need to maintain two copies of data and need fast access to the data from both the CPU and the GPU. This traditionally puts a significant burden on a developer or user to maintain and keep two pointers. For example, the user or programmer usually has to take explicit actions to ensure both copies of data associated with the pointers or addresses are consistent. This can become a very complicated and extensive task which increases the workload and effort required by a user and in turn can also increase the barrier to entry for novice users of the programs. These added burdens and difficulties increase the likelihood of programming mistakes that adversely impact system performance (e.g., increased faults, non-coherent data, etc.). Traditional approaches can also make widespread adoption of associated components (e.g., CPUs, GPUs, etc.) harder, because it's more difficult to port existing code written for one processor (e.g., the CPU) over to a heterogeneous system that has multiple processors (e.g., both a CPU and a GPU).